;;; init.el --- .Emacs Configuration -*- lexical-binding: t -*-
;;; Commentary:
;; This config start here
;;; Code:
(add-hook 'emacs-startup-hook
          (lambda ()
            (message "Emacs cargado en %s y listos para ser usado."
                     (format "%.2f segundos"
                             (float-time
                              (time-subtract after-init-time before-init-time)))
                     gcs-done)))

(defvar default-file-name-handler-alist file-name-handler-alist)
(setq gc-cons-threshold 402653184
      gc-cons-percentage 0.6
      file-name-handler-alist nil)

;;
;; Carga de las el nucleo
;;

(require 'core (concat user-emacs-directory "core/core.el"))

(add-hook 'emacs-startup-hook
          (lambda ()
            "Restore defalut values after init."
            (setq gc-cons-threshold 16777216
                  gc-cons-percentage 0.1
                  file-name-handler-alist default-file-name-handler-alist)

            (add-hook 'focus-out-hook 'garbage-collect)))

(provide 'init)
;;; init.el ends here
